package red.mlz.module.config;

import java.util.concurrent.atomic.AtomicReference;

public class DynamicDataSourceContextHolder {
    private static final AtomicReference<String> contextHolder = new AtomicReference<>();

    public static void setDataSourceType(String type) {
        contextHolder.set(type);
    }

    public static String getDataSourceType() {
        return contextHolder.get();
    }

    public static void clearDataSourceType() {
        contextHolder.set(null);
    }
}
